using System;
using System.Threading.Tasks;
using System.Collections.Generic;
using System.Numerics;
using Nethereum.Hex.HexTypes;
using Nethereum.ABI.FunctionEncoding.Attributes;
using Nethereum.RPC.Eth.DTOs;
using Nethereum.Contracts.CQS;
using Nethereum.Contracts;

namespace Nethereum.Mud.Contracts.World.Systems.AccessManagementSystem.ContractDefinition
{


    public partial class AccessManagementSystemDeployment : AccessManagementSystemDeploymentBase
    {
        public AccessManagementSystemDeployment() : base(BYTECODE) { }
        public AccessManagementSystemDeployment(string byteCode) : base(byteCode) { }
    }

    public class AccessManagementSystemDeploymentBase : ContractDeploymentMessage
    {
        public static string BYTECODE = "0x60a06040523060805234801561001457600080fd5b50608051611c3861003060003960006103150152611c386000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c806345ec93541161005b57806345ec93541461010a5780638d53b2081461011d578063e1af802c14610130578063ef5d6bbb1461013857600080fd5b806301ffc9a71461008d578063119df25f146100b5578063219adc2e146100e257806340554c3a146100f7575b600080fd5b6100a061009b366004611806565b61014b565b60405190151581526020015b60405180910390f35b6100bd6101e4565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100ac565b6100f56100f0366004611848565b6101f3565b005b6100f5610105366004611861565b61023b565b604051601f1936013581526020016100ac565b6100f561012b366004611861565b610268565b6100bd610286565b6100f5610146366004611861565b610290565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167fb5dee1270000000000000000000000000000000000000000000000000000000014806101de57507fffffffff0000000000000000000000000000000000000000000000000000000082167f01ffc9a700000000000000000000000000000000000000000000000000000000145b92915050565b60006101ee6102cc565b905090565b6101fb6102fe565b6102048161036f565b61020d81610421565b61021e816102196101e4565b61046c565b61022781610527565b610238816102336101e4565b6105b2565b50565b6102436102fe565b61024c82610421565b610258826102196101e4565b6102648282600161067a565b5050565b6102706102fe565b61027c826102196101e4565b61026482826105b2565b60006101ee610771565b6102986102fe565b6102a18261036f565b6102aa82610421565b6102b6826102196101e4565b6102c0828261077b565b610258826102336101e4565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffcc36013560601c806102fb5750335b90565b73ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016300361036d576040517f9f03a02600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b7f6e730000000000000000000000000000000000000000000000000000000000007dffffffffffffffffffffffffffff000000000000000000000000000000008216178114610238577f6e73000000000000000000000000000000000000000000000000000000000000816103e383610858565b6040517f5c30fb6f000000000000000000000000000000000000000000000000000000008152600401610418939291906118fa565b60405180910390fd5b61042a81610995565b610238578061043882610858565b6040517ffbf10ce600000000000000000000000000000000000000000000000000000000815260040161041892919061193b565b73ffffffffffffffffffffffffffffffffffffffff81166104ce7f6e730000000000000000000000000000000000000000000000000000000000007dffffffffffffffffffffffffffff00000000000000000000000000000000851617610a3a565b73ffffffffffffffffffffffffffffffffffffffff1614610264576104f282610858565b816040517fd787b737000000000000000000000000000000000000000000000000000000008152600401610418929190611954565b60408051600180825281830190925260009160208083019080368337019050509050818160008151811061055d5761055d6119a2565b60209081029190910101526102647f7462776f726c640000000000000000004e616d6573706163654f776e65720000827e14010014000000000000000000000000000000000000000000000000000000610ad6565b60408051600280825260608201835260009260208301908036833701905050905082816000815181106105e7576105e76119a2565b6020026020010181815250508173ffffffffffffffffffffffffffffffffffffffff1660001b81600181518110610620576106206119a2565b60209081029190910101526106757f7462776f726c640000000000000000005265736f757263654163636573730000827e01010001000000000000000000000000000000000000000000000000000000610ad6565b505050565b60408051600280825260608201835260009260208301908036833701905050905083816000815181106106af576106af6119a2565b6020026020010181815250508273ffffffffffffffffffffffffffffffffffffffff1660001b816001815181106106e8576106e86119a2565b60200260200101818152505061076b7f7462776f726c640000000000000000005265736f75726365416363657373000060001b8260008560405160200161073691151560f81b815260010190565b60408051601f198184030181529190527e01010001000000000000000000000000000000000000000000000000000000610ddd565b50505050565b60006101ee610df9565b6040805160018082528183019092526000916020808301908036833701905050905082816000815181106107b1576107b16119a2565b6020026020010181815250506106757f7462776f726c640000000000000000004e616d6573706163654f776e6572000060001b82600085604051602001610823919060609190911b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016815260140190565b60408051601f198184030181529190527e14010014000000000000000000000000000000000000000000000000000000610ddd565b606081601081901b600061086b83610e45565b9050827fffffffffffffffffffffffffffff0000000000000000000000000000000000008316156108c6576108c17fffffffffffffffffffffffffffff0000000000000000000000000000000000008416610e5c565b6108fd565b6040518060400160405280600681526020017f3c726f6f743e00000000000000000000000000000000000000000000000000008152505b7fffffffffffffffffffffffffffffffff000000000000000000000000000000008316156109335761092e83610e5c565b61096a565b6040518060400160405280600681526020017f3c726f6f743e00000000000000000000000000000000000000000000000000008152505b60405160200161097c939291906119b8565b6040516020818303038152906040529350505050919050565b6040805160018082528183019092526000918291906020808301908036833701905050905082816000815181106109ce576109ce6119a2565b60209081029190910101526000610a267f746273746f72650000000000000000005265736f75726365496473000000000083837e01010001000000000000000000000000000000000000000000000000000000610f00565b9050610a328160f81c90565b949350505050565b604080516001808252818301909252600091829190602080830190803683370190505090508281600081518110610a7357610a736119a2565b60209081029190910101526000610acb7f7462776f726c640000000000000000004e616d6573706163654f776e6572000083837e14010014000000000000000000000000000000000000000000000000000000610f00565b60601c949350505050565b7f6f74000000000000000000000000000000000000000000000000000000000000837fffff0000000000000000000000000000000000000000000000000000000000001603610b5c57827f0e1f72f429eb97e64878619984a91e687ae91610348b9ff4216782cc96e49d0783604051610b4f9190611a82565b60405180910390a2505050565b6000610b6784610f36565b905060005b8151811015610c3a576000828281518110610b8957610b896119a2565b60200260200101519050610bb56040826affffffffffffffffffffff1916610fbf90919063ffffffff16565b15610c31576040517f9faeaf45000000000000000000000000000000000000000000000000000000008152606082901c90639faeaf4590610bfe90899089908990600401611a95565b600060405180830381600087803b158015610c1857600080fd5b505af1158015610c2c573d6000803e3d6000fd5b505050505b50600101610b6c565b50837f0e1f72f429eb97e64878619984a91e687ae91610348b9ff4216782cc96e49d0784604051610c6b9190611a82565b60405180910390a26000610c7f8585610fdd565b9050610cd8816000610c9086611033565b67ffffffffffffffff811115610ca857610ca861198c565b6040519080825280601f01601f191660200182016040528015610cd2576020820181803683370190505b50611056565b6000610ce38461106c565b1115610d04576000610cf586866110a9565b9050610d028160206110ff565b505b60005b8251811015610dd5576000838281518110610d2457610d246119a2565b60200260200101519050610d506080826affffffffffffffffffffff1916610fbf90919063ffffffff16565b15610dcc576040517f83b5c95b000000000000000000000000000000000000000000000000000000008152606082901c906383b5c95b90610d99908a908a908a90600401611a95565b600060405180830381600087803b158015610db357600080fd5b505af1158015610dc7573d6000803e3d6000fd5b505050505b50600101610d07565b505050505050565b610df28585610dec848761113c565b85611175565b5050505050565b7f629a4c26e296b22a8e0856e9f6ecb2d1008d7e00081111962cd175fa7488e1755460009073ffffffffffffffffffffffffffffffffffffffff1680610e40573391505090565b919050565b6000610e5360706010611ad4565b9190911b919050565b606060005b6010811015610ec1577fffffffffffffffffffffffffffffffff000000000000000000000000000000008316600882021b7fff000000000000000000000000000000000000000000000000000000000000001615610ec157600101610e61565b604080517fffffffffffffffffffffffffffffffff00000000000000000000000000000000851660208201528151603090910190915281815280610a32565b6000610f2d610f0f8686610fdd565b60ff858116601b0360080285901c16610f28858761113c565b611419565b95945050505050565b60408051600180825281830190925260609160009190602080830190803683370190505090508281600081518110610f7057610f706119a2565b60209081029190910101526000610fa87f746273746f726500000000000000000053746f7265486f6f6b73000000000000838361146a565b9050610a32610fba82600084516114a4565b611532565b60008160ff1682610fd08560581c90565b1660ff1614905092915050565b60008282604051602001610ff2929190611ae7565b60408051601f1981840301815291905280516020909101207f86425bff6b57326c7859e89024fe4f238ca327a1ae4a230180dd2f0e88aaa7d9189392505050565b6000600861104360026020611b23565b61104d9190611b36565b9190911c919050565b610675838383516110678560200190565b61154a565b6000600860018061107f60026020611b23565b6110899190611b23565b6110939190611b23565b61109d9190611b36565b8260ff911c1692915050565b600082826040516020016110be929190611ae7565b60408051601f1981840301815291905280516020909101207f14e2fcc58e58e68ec7edc30c8d50dccc3ce2714a623ec81f46b6a63922d76569189392505050565b6000602061110e83601f611ad4565b6111189190611b63565b6111229084611ad4565b90505b808310156106755760008355600183019250611125565b600080805b8360ff1681101561116d5761116360ff601b83900360080287901c1683611ad4565b9150600101611141565b509392505050565b7f6f74000000000000000000000000000000000000000000000000000000000000847fffff00000000000000000000000000000000000000000000000000000000000016036111ff57837f8c0b5119d4cec7b284c6b1b39252a03d1e2f2d7451a5895562524c113bb952be8484846040516111f293929190611b85565b60405180910390a261076b565b600061120b8585610fdd565b9050600061121886610f36565b905060005b81518110156112ed57600082828151811061123a5761123a6119a2565b602002602001015190506112666004826affffffffffffffffffffff1916610fbf90919063ffffffff16565b156112e4576040517f964f667d000000000000000000000000000000000000000000000000000000008152606082901c9063964f667d906112b1908b908b908b908b90600401611bc2565b600060405180830381600087803b1580156112cb57600080fd5b505af11580156112df573d6000803e3d6000fd5b505050505b5060010161121d565b50857f8c0b5119d4cec7b284c6b1b39252a03d1e2f2d7451a5895562524c113bb952be86868660405161132293929190611b85565b60405180910390a261133d828565ffffffffffff1685611056565b60005b815181101561141057600082828151811061135d5761135d6119a2565b602002602001015190506113896008826affffffffffffffffffffff1916610fbf90919063ffffffff16565b15611407576040517fa8ba8721000000000000000000000000000000000000000000000000000000008152606082901c9063a8ba8721906113d4908b908b908b908b90600401611bc2565b600060405180830381600087803b1580156113ee57600080fd5b505af1158015611402573d6000803e3d6000fd5b505050505b50600101611340565b50505050505050565b60006020821061143f5760208204840193506020828161143b5761143b611b4d565b0691505b508254600882021b60208290038084111561116d576001850154600882021c82179150509392505050565b6060610a3261147a858585611609565b600061149f8561148a8989611689565b9060ff166028026038011c64ffffffffff1690565b61169c565b6000818311806114b45750835182115b156114f1578383836040517f23230fa300000000000000000000000000000000000000000000000000000000815260040161041893929190611c06565b602084016114ff8482611ad4565b9050600061150d8585611b23565b6fffffffffffffffffffffffffffffffff1660809290921b9190911795945050505050565b6060600061154383601560006116bf565b9392505050565b82156115c457602083106115745760208304840193506020838161157057611570611b4d565b0692505b82156115c45760208390036000600019600885021c1990506008850281811c91508351811c90508119875416828216178755508184116115b557505061076b565b50600194909401939182900391015b5b602082106115e65780518455600190930192601f19909101906020016115c5565b811561076b576000600019600884021c8554835182191691161785555050505050565b6000838360405160200161161e929190611ae7565b604051602081830303815290604052805190602001208260f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167f3b4102da22e32d82fc925482184f16c09fd4281692720b87d124aef6da48a0f1181860001c90509392505050565b600061154361169884846110a9565b5490565b60405160208101601f19603f848401011660405282825261116d8585858461173a565b606060006116cd8560801c90565b90506fffffffffffffffffffffffffffffffff851660008582816116f3576116f3611b4d565b04905060405193506020840160208202810160405281855260005b8281101561172e578451871c82529387019360209091019060010161170e565b50505050509392505050565b82156117c157602083106117645760208304840193506020838161176057611760611b4d565b0692505b82156117c15760208390036000818410156117875750600019600884021c611791565b50600019600882021c5b8554600886021b8184511682198216178452508184116117b257505061076b565b50600194909401939182900391015b5b602082106117e35783548152600190930192601f19909101906020016117c2565b811561076b576000600019600884021c8251865482191691161782525050505050565b60006020828403121561181857600080fd5b81357fffffffff000000000000000000000000000000000000000000000000000000008116811461154357600080fd5b60006020828403121561185a57600080fd5b5035919050565b6000806040838503121561187457600080fd5b82359150602083013573ffffffffffffffffffffffffffffffffffffffff8116811461189f57600080fd5b809150509250929050565b60005b838110156118c55781810151838201526020016118ad565b50506000910152565b600081518084526118e68160208601602086016118aa565b601f01601f19169290920160200192915050565b7fffff00000000000000000000000000000000000000000000000000000000000084168152826020820152606060408201526000610f2d60608301846118ce565b828152604060208201526000610a3260408301846118ce565b60408152600061196760408301856118ce565b905073ffffffffffffffffffffffffffffffffffffffff831660208301529392505050565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b7fffff0000000000000000000000000000000000000000000000000000000000008416815260007f3a000000000000000000000000000000000000000000000000000000000000008060028401528451611a198160038601602089016118aa565b808401905081600382015284519150611a398260048301602088016118aa565b0160040195945050505050565b60008151808452602080850194506020840160005b83811015611a7757815187529582019590820190600101611a5b565b509495945050505050565b6020815260006115436020830184611a46565b838152606060208201526000611aae6060830185611a46565b9050826040830152949350505050565b634e487b7160e01b600052601160045260246000fd5b808201808211156101de576101de611abe565b8281526000602080830184516020860160005b82811015611b1657815184529284019290840190600101611afa565b5091979650505050505050565b818103818111156101de576101de611abe565b80820281158282048414176101de576101de611abe565b634e487b7160e01b600052601260045260246000fd5b600082611b8057634e487b7160e01b600052601260045260246000fd5b500490565b606081526000611b986060830186611a46565b65ffffffffffff851660208401528281036040840152611bb881856118ce565b9695505050505050565b848152608060208201526000611bdb6080830186611a46565b65ffffffffffff851660408401528281036060840152611bfb81856118ce565b979650505050505050565b606081526000611c1960608301866118ce565b6020830194909452506040015291905056fea164736f6c6343000818000a";
        public AccessManagementSystemDeploymentBase() : base(BYTECODE) { }
        public AccessManagementSystemDeploymentBase(string byteCode) : base(byteCode) { }

    }

    public partial class MsgSenderFunction : MsgSenderFunctionBase { }

    [Function("_msgSender", "address")]
    public class MsgSenderFunctionBase : FunctionMessage
    {

    }

    public partial class MsgValueFunction : MsgValueFunctionBase { }

    [Function("_msgValue", "uint256")]
    public class MsgValueFunctionBase : FunctionMessage
    {

    }

    public partial class WorldFunction : WorldFunctionBase { }

    [Function("_world", "address")]
    public class WorldFunctionBase : FunctionMessage
    {

    }

    public partial class GrantAccessFunction : GrantAccessFunctionBase { }

    [Function("grantAccess")]
    public class GrantAccessFunctionBase : FunctionMessage
    {
        [Parameter("bytes32", "resourceId", 1)]
        public virtual byte[] ResourceId { get; set; }
        [Parameter("address", "grantee", 2)]
        public virtual string Grantee { get; set; }
    }

    public partial class RenounceOwnershipFunction : RenounceOwnershipFunctionBase { }

    [Function("renounceOwnership")]
    public class RenounceOwnershipFunctionBase : FunctionMessage
    {
        [Parameter("bytes32", "namespaceId", 1)]
        public virtual byte[] NamespaceId { get; set; }
    }

    public partial class RevokeAccessFunction : RevokeAccessFunctionBase { }

    [Function("revokeAccess")]
    public class RevokeAccessFunctionBase : FunctionMessage
    {
        [Parameter("bytes32", "resourceId", 1)]
        public virtual byte[] ResourceId { get; set; }
        [Parameter("address", "grantee", 2)]
        public virtual string Grantee { get; set; }
    }

    public partial class SupportsInterfaceFunction : SupportsInterfaceFunctionBase { }

    [Function("supportsInterface", "bool")]
    public class SupportsInterfaceFunctionBase : FunctionMessage
    {
        [Parameter("bytes4", "interfaceId", 1)]
        public virtual byte[] InterfaceId { get; set; }
    }

    public partial class TransferOwnershipFunction : TransferOwnershipFunctionBase { }

    [Function("transferOwnership")]
    public class TransferOwnershipFunctionBase : FunctionMessage
    {
        [Parameter("bytes32", "namespaceId", 1)]
        public virtual byte[] NamespaceId { get; set; }
        [Parameter("address", "newOwner", 2)]
        public virtual string NewOwner { get; set; }
    }

    public partial class StoreDeleterecordEventDTO : StoreDeleterecordEventDTOBase { }

    [Event("Store_DeleteRecord")]
    public class StoreDeleterecordEventDTOBase : IEventDTO
    {
        [Parameter("bytes32", "tableId", 1, true)]
        public virtual byte[] TableId { get; set; }
        [Parameter("bytes32[]", "keyTuple", 2, false)]
        public virtual List<byte[]> KeyTuple { get; set; }
    }

    public partial class StoreSplicestaticdataEventDTO : StoreSplicestaticdataEventDTOBase { }

    [Event("Store_SpliceStaticData")]
    public class StoreSplicestaticdataEventDTOBase : IEventDTO
    {
        [Parameter("bytes32", "tableId", 1, true)]
        public virtual byte[] TableId { get; set; }
        [Parameter("bytes32[]", "keyTuple", 2, false)]
        public virtual List<byte[]> KeyTuple { get; set; }
        [Parameter("uint48", "start", 3, false)]
        public virtual ulong Start { get; set; }
        [Parameter("bytes", "data", 4, false)]
        public virtual byte[] Data { get; set; }
    }

    public partial class SliceOutofboundsError : SliceOutofboundsErrorBase { }

    [Error("Slice_OutOfBounds")]
    public class SliceOutofboundsErrorBase : IErrorDTO
    {
        [Parameter("bytes", "data", 1)]
        public virtual byte[] Data { get; set; }
        [Parameter("uint256", "start", 2)]
        public virtual BigInteger Start { get; set; }
        [Parameter("uint256", "end", 3)]
        public virtual BigInteger End { get; set; }
    }

    public partial class UnauthorizedCallContextError : UnauthorizedCallContextErrorBase { }
    [Error("UnauthorizedCallContext")]
    public class UnauthorizedCallContextErrorBase : IErrorDTO
    {
    }

    public partial class WorldAccessdeniedError : WorldAccessdeniedErrorBase { }

    [Error("World_AccessDenied")]
    public class WorldAccessdeniedErrorBase : IErrorDTO
    {
        [Parameter("string", "resource", 1)]
        public virtual string Resource { get; set; }
        [Parameter("address", "caller", 2)]
        public virtual string Caller { get; set; }
    }

    public partial class WorldInvalidresourcetypeError : WorldInvalidresourcetypeErrorBase { }

    [Error("World_InvalidResourceType")]
    public class WorldInvalidresourcetypeErrorBase : IErrorDTO
    {
        [Parameter("bytes2", "expected", 1)]
        public virtual byte[] Expected { get; set; }
        [Parameter("bytes32", "resourceId", 2)]
        public virtual byte[] ResourceId { get; set; }
        [Parameter("string", "resourceIdString", 3)]
        public virtual string ResourceIdString { get; set; }
    }

    public partial class WorldResourcenotfoundError : WorldResourcenotfoundErrorBase { }

    [Error("World_ResourceNotFound")]
    public class WorldResourcenotfoundErrorBase : IErrorDTO
    {
        [Parameter("bytes32", "resourceId", 1)]
        public virtual byte[] ResourceId { get; set; }
        [Parameter("string", "resourceIdString", 2)]
        public virtual string ResourceIdString { get; set; }
    }

    public partial class MsgSenderOutputDTO : MsgSenderOutputDTOBase { }

    [FunctionOutput]
    public class MsgSenderOutputDTOBase : IFunctionOutputDTO
    {
        [Parameter("address", "sender", 1)]
        public virtual string Sender { get; set; }
    }

    public partial class MsgValueOutputDTO : MsgValueOutputDTOBase { }

    [FunctionOutput]
    public class MsgValueOutputDTOBase : IFunctionOutputDTO
    {
        [Parameter("uint256", "value", 1)]
        public virtual BigInteger Value { get; set; }
    }

    public partial class WorldOutputDTO : WorldOutputDTOBase { }

    [FunctionOutput]
    public class WorldOutputDTOBase : IFunctionOutputDTO
    {
        [Parameter("address", "", 1)]
        public virtual string ReturnValue1 { get; set; }
    }







    public partial class SupportsInterfaceOutputDTO : SupportsInterfaceOutputDTOBase { }

    [FunctionOutput]
    public class SupportsInterfaceOutputDTOBase : IFunctionOutputDTO
    {
        [Parameter("bool", "", 1)]
        public virtual bool ReturnValue1 { get; set; }
    }


}
